<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>GIS支持系统</title>
  <link rel="shortcut icon" href="${pageContext.request.contextPath}/static/images/favicon.ico">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/libs/layui1.0.9/css/layui.css">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/css/style.css">
  <link rel="icon" href="href="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/image/code.png">
</head>
<body>

<!-- layout admin -->
<div class="layui-layout layui-layout-admin"> <!-- 添加skin-1类可手动修改主题为纯白，添加skin-2类可手动修改主题为蓝白 -->
  <!-- header -->
  <div class="layui-header my-header">
    <a href="index.html">
      <div class="my-header-logo">GIS支持系统</div>
    </a>
    <div class="my-header-btn">
      <button class="layui-btn layui-btn-xs btn-nav"><i class="layui-icon">&#xe65f;</i></button>
    </div>

    <!-- 顶部左侧添加选项卡监听 -->
    <ul class="layui-nav" lay-filter="side-top-left"></ul>

    <!-- 顶部右侧添加选项卡监听 -->
    <ul class="layui-nav my-header-user-nav" lay-filter="side-top-right">
      <!--
      <li class="layui-nav-item">
        <a class="name" href="javascript:;"><i class="layui-icon">&#xe629;</i>主题</a>
        <dl class="layui-nav-child">
          <dd data-skin="0"><a href="javascript:;">默认</a></dd>
          <dd data-skin="1"><a href="javascript:;">纯白</a></dd>
          <dd data-skin="2"><a href="javascript:;">蓝白</a></dd>
        </dl>
      </li>-->
      <li class="layui-nav-item">
        <a class="name" href="javascript:;">
          <img src="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/image/code.png" alt="logo"> <shiro:principal/> </a>
        <dl class="layui-nav-child">
          <dd><a href="/logout" href-url="/login"><i class="layui-icon">&#xe621;</i>首页</a></dd>
          <dd><a href="javascript:;" href-url="demo/map.html"><i class="layui-icon">&#xe621;</i>图表</a></dd>
          <dd><a href="${pageContext.request.contextPath}/logout"><i class="layui-icon">&#x1006;</i>退出</a></dd>
        </dl>
      </li>
    </ul>
  </div>
  <!-- side -->
  <div class="layui-side my-side">
    <div class="layui-side-scroll">
      <!-- 左侧主菜单添加选项卡监听 -->
      <ul class="layui-nav layui-nav-tree" lay-filter="side-main"></ul>
    </div>
  </div>
  <!-- body -->
  <div class="layui-body my-body">
    <div class="layui-tab layui-tab-card my-tab" lay-filter="card" lay-allowClose="true">
      <ul class="layui-tab-title">
        <li class="layui-this" lay-id="1"><span><i class="layui-icon">&#xe638;</i>首页</span></li>
      </ul>
      <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
          <iframe id="iframe" src="${pageContext.request.contextPath}/static/libs/uiframe/demo/welcome.html" frameborder="0"></iframe>
        </div>
      </div>
    </div>
  </div>
  <!-- footer -->
  <div class="layui-footer my-footer">
    <p><a>3CGIS 支持系统</a></p>
    <p>2017 © copyright 苏ICP备11074001号</p>
  </div>
</div>

<!-- pay -->
<div class="my-pay-box none">
  <div><img src="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/image/zfb.png" alt="支付宝"><p>支付宝</p></div>
  <div><img src="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/image/wx.png" alt="微信"><p>微信</p></div>
</div>

<!-- 右键菜单 -->
<div class="my-dblclick-box none">
  <table class="layui-tab dblclick-tab">
    <tr class="card-refresh">
      <td><i class="layui-icon">&#x1002;</i>刷新当前标签</td>
    </tr>
    <tr class="card-close">
      <td><i class="layui-icon">&#x1006;</i>关闭当前标签</td>
    </tr>
    <tr class="card-close-all">
      <td><i class="layui-icon">&#x1006;</i>关闭所有标签</td>
    </tr>
  </table>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath}/static/libs/layui1.0.9/layui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/libs/uiframe/frame/static/js/index.js"></script>
<script type="text/javascript">
    layui.use(['layer','vip_nav'], function () {

        // 操作对象
        var layer = layui.layer,
            vipNav = layui.vip_nav,
            $ = layui.jquery;

        // 顶部左侧菜单生成 [请求地址,过滤ID,是否展开,携带参数]
        //vipNav.top_left('${pageContext.request.contextPath}/static/libs/uiframe/json/nav_top_left.json','side-top-left',false);


        // 主体菜单生成 [请求地址,过滤ID,是否展开,携带参数]
        $.ajax({
            type:'get',
            url:'${pageContext.request.contextPath}/sys/menu/menulist',
            contentType:'application/json;charset=utf-8',
            success:function (data) {
                if(data != null && data.length > 0){
                    vipNav.main(data,'side-main',true);
                }else {
                    vipNav.main([],'side-main',true);
                }
            },
            error:function (error) {
                console.log(error);
                vipNav.main([],'side-main',true);
            }
        });


    });
</script>
</body>
</html>
